package org.lib.postgresqlhello.device.dto;

import org.lib.postgresqlhello.device.Device;

import lombok.Data;

/**
 * 添加Device
 * @author ben
 * @date 2021-11-08 20:56:56 CST
 */
@Data
public class AddDeviceDTO {

    private Long sn;
    
    private String name;
    
    /**
     * 新建实体类
     * @author ben
     * @date 2021-11-08 21:21:24 CST
     * @return 返回新建实体类
     */
    public Device convertToDevice() {
    	Device d = new Device();
    	d.setSn(this.sn);
    	d.setName(this.name);
    	return d;
    }
    
}
